<template></template>
<script>
	import getAppInfo from '@/components/modelParser/libs/getAppInfo.js';
	export default {
		onLoad() {
			getAppInfo().then(() => {
				var appInfo = this.$appInfo;
				if (appInfo.startType === 'tabbar') {
					uni.redirectTo({
						url: '/views/indexPage'
					});
				} else if (appInfo.startType === 'singlePage') {
					uni.redirectTo({
						url: '/views/singlePage?pageId=' + appInfo.startPageId
					});
				} else {
					uni.showToast({
						title: '请先配置启动信息',
						icon: 'none'
					});
				}
			},()=>{
				setTimeout(()=>{
					uni.showToast({
						title: '加载项目资源失败',
						icon: 'none'
					});
				})
			}).finally(() => {
				uni.hideLoading();
			})
		}
	};
</script>
